import Vuex, { Module } from 'vuex'

let state = {
    is_enter_chat: false
};

export default {
    namespaced: true,
    state,
    mutations: {
        set_is_enter_chat(state, payload: boolean) {
            state.is_enter_chat = payload;
        }
    },
    actions: {
        chat_enter({ commit }) {
            commit("set_is_enter_chat", true);
        },
        chat_leave({ commit }) {
            commit("set_is_enter_chat", false);
        }
    }
} as Module<typeof state, any>;